package com.panda.controller;/**
 * @author 乐于吕
 * * @date 2024/10/18
 */

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 乐于吕
 * @CreateTime: 2024-10-18
 * @Description:
 */

@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigClientController {

    @Value("${server.port}")
    private String port;

    @Value("${name}")
    private String name;

    @GetMapping("m1")
    public String method1() {
        return "ConfigClientController  success  port: " + port + " name: " + name;
    }

}
